import re
def main():
    x=input("请输入0-255长度的字符串:")
    if 0<len(x)<255:
        letter(x)
    else:
        print("输入错误")
def letter(e):
    str2=re.sub("[^A-Za-z]","",e)
    print(str2)
    reverse(str2)
def reverse(n):
    list1=list(n)
    y_1=[]
    for i in list1[::-1]:
        y_1.append(i)
    enCode(n)
def enCode(m):
    for p in m:
        if ord("a")<=ord(p)<=ord("z"):
            print(chr(ord("a")+(ord(p)-ord("a")+3)%26),end='')
        else:
            print(p,end='')
main()
